package com.hzy.fivepalace.db.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(value="DtsGroupProduct实体对象")
@TableName("dts_group_product")
public class DtsGroupProduct implements Serializable {
    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.id
     *
     * @mbg.generated
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.title
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="团购标题")
    private String title;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.active_img
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="活动图片")
    private String activeImg;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.cate_id
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="总分类id")
    private Integer cateId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.cate_child_id
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="子分类id")
    private Integer cateChildId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.buy_type
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="团购类型 0 - 所有用户都可参加  都可以跟团    1 - 只有 新用户可以跟团  开团不受限制")
    private Integer buyType;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.link_type
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="团购的类型 1 - 普通商品 2 - 优惠券")
    private Integer linkType;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.link_id
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="商品 id")
    private Integer linkId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.is_new_user_group
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="是否是新人团")
    private Integer isNewUserGroup;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.user_count
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="成团人数")
    private Integer userCount;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.sale_count
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="团购份数")
    private Integer saleCount;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.left_count
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="剩余数量")
    private Integer leftCount;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.normal_price
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="普通单独购买价格")
    private BigDecimal normalPrice;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.group_buy_price
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="拼团购买的价格")
    private BigDecimal groupBuyPrice;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.save_money
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="省下的金额")
    private String saveMoney;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.begin_time
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="活动开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date beginTime;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.end_time
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="活动结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.end_time
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="添加時間")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.is_one_buy
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="是否可以单独购买")
    private Integer isOneBuy;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.state
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="团购状态  0 - 未开启  1 - 已开启  2- 已结束")
    private Integer state;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dts_group_product.sort
     *
     * @mbg.generated
     */
    @ApiModelProperty(value="")
    private Integer sort;


    /**
     *  团购商品
     */
    @TableField(exist = false)
    private DtsGoods goods;

    /**
     *  活动起止时间
     */
    @TableField(exist = false)
    private String[] dateRange;

    @TableField(exist = false)
    private String activeImgPath;

    @TableField(exist = false)
    private String wxBeginTime;

    @TableField(exist = false)
    private String wxEndTime;

    @TableField(exist = false)
    private Integer isHasGroup;

    @TableField(exist = false)
    private DtsGroupOpenList groupOpenList;


}
